/**
 * React Router DOM v6.17.0
 *
 * Copyright (c) Remix Software Inc.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE.md file in the root directory of this source tree.
 *
 * @license MIT
 */
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t(exports,require("react"),require("react-router"),require("@remix-run/router")):"function"==typeof define&&define.amd?define(["exports","react","react-router","@remix-run/router"],t):t((e="undefined"!=typeof globalThis?globalThis:e||self).ReactRouterDOM={},e.React,e.ReactRouter,e.RemixRouter)}(this,(function(e,t,n,r){"use strict";function o(e){if(e&&e.__esModule)return e;var t=Object.create(null);return e&&Object.keys(e).forEach((function(n){if("default"!==n){var r=Object.getOwnPropertyDescriptor(e,n);Object.defineProperty(t,n,r.get?r:{enumerable:!0,get:function(){return e[n]}})}})),t.default=e,Object.freeze(t)}var a=o(t);function i(){return i=Object.assign?Object.assign.bind():function(e){for(var t=1;t<arguments.length;t++){var n=arguments[t];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(e[r]=n[r])}return e},i.apply(this,arguments)}function u(e,t){if(null==e)return{};var n,r,o={},a=Object.keys(e);for(r=0;r<a.length;r++)n=a[r],t.indexOf(n)>=0||(o[n]=e[n]);return o}const s="get",c="application/x-www-form-urlencoded";function l(e){return null!=e&&"string"==typeof e.tagName}function f(e){return void 0===e&&(e=""),new URLSearchParams("string"==typeof e||Array.isArray(e)||e instanceof URLSearchParams?e:Object.keys(e).reduce(((t,n)=>{let r=e[n];return t.concat(Array.isArray(r)?r.map((e=>[n,e])):[[n,r]])}),[]))}let d=null;const m=new Set(["application/x-www-form-urlencoded","multipart/form-data","text/plain"]);function p(e){return null==e||m.has(e)?e:null}function b(e,t){let n,o,a,i,u;if(l(f=e)&&"form"===f.tagName.toLowerCase()){let u=e.getAttribute("action");o=u?r.stripBasename(u,t):null,n=e.getAttribute("method")||s,a=p(e.getAttribute("enctype"))||c,i=new FormData(e)}else if(function(e){return l(e)&&"button"===e.tagName.toLowerCase()}(e)||function(e){return l(e)&&"input"===e.tagName.toLowerCase()}(e)&&("submit"===e.type||"image"===e.type)){let u=e.form;if(null==u)throw new Error('Cannot submit a <button> or <input type="submit"> without a <form>');let l=e.getAttribute("formaction")||u.getAttribute("action");if(o=l?r.stripBasename(l,t):null,n=e.getAttribute("formmethod")||u.getAttribute("method")||s,a=p(e.getAttribute("formenctype"))||p(u.getAttribute("enctype"))||c,i=new FormData(u,e),!function(){if(null===d)try{new FormData(document.createElement("form"),0),d=!1}catch(e){d=!0}return d}()){let{name:t,type:n,value:r}=e;if("image"===n){let e=t?t+".":"";i.append(e+"x","0"),i.append(e+"y","0")}else t&&i.append(t,r)}}else{if(l(e))throw new Error('Cannot submit element that is not <form>, <button>, or <input type="submit|image">');n=s,o=null,a=c,u=e}var f;return i&&"text/plain"===a&&(u=i,i=void 0),{action:o,method:n.toLowerCase(),encType:a,formData:i,body:u}}const v=["onClick","relative","reloadDocument","replace","state","target","to","preventScrollReset","unstable_viewTransition"],h=["aria-current","caseSensitive","className","end","style","to","unstable_viewTransition","children"],g=["reloadDocument","replace","state","method","action","onSubmit","submit","relative","preventScrollReset","unstable_viewTransition"];function y(){var e;let t=null==(e=window)?void 0:e.__staticRouterHydrationData;return t&&t.errors&&(t=i({},t,{errors:w(t.errors)})),t}function w(e){if(!e)return null;let t=Object.entries(e),n={};for(let[e,o]of t)if(o&&"RouteErrorResponse"===o.__type)n[e]=new r.UNSAFE_ErrorResponseImpl(o.status,o.statusText,o.data,!0===o.internal);else if(o&&"Error"===o.__type){if(o.__subType){let t=window[o.__subType];if("function"==typeof t)try{let r=new t(o.message);r.stack="",n[e]=r}catch(e){}}if(null==n[e]){let t=new Error(o.message);t.stack="",n[e]=t}}else n[e]=o;return n}const R=a.createContext({isTransitioning:!1}),S=a.startTransition;class E{constructor(){this.status="pending",this.promise=new Promise(((e,t)=>{this.resolve=t=>{"pending"===this.status&&(this.status="resolved",e(t))},this.reject=e=>{"pending"===this.status&&(this.status="rejected",t(e))}}))}}function P(e){let{routes:t,state:r}=e;return n.UNSAFE_useRoutesImpl(t,void 0,r)}const _="undefined"!=typeof window&&void 0!==window.document&&void 0!==window.document.createElement,O=/^(?:[a-z][a-z0-9+.-]*:|\/\/)/i,N=a.forwardRef((function(e,t){let o,{onClick:s,relative:c,reloadDocument:l,replace:f,state:d,target:m,to:p,preventScrollReset:b,unstable_viewTransition:h}=e,g=u(e,v),{basename:y}=a.useContext(n.UNSAFE_NavigationContext),w=!1;if("string"==typeof p&&O.test(p)&&(o=p,_))try{let e=new URL(window.location.href),t=p.startsWith("//")?new URL(e.protocol+p):new URL(p),n=r.stripBasename(t.pathname,y);t.origin===e.origin&&null!=n?p=n+t.search+t.hash:w=!0}catch(e){}let R=n.useHref(p,{relative:c}),S=L(p,{replace:f,state:d,target:m,preventScrollReset:b,relative:c,unstable_viewTransition:h});return a.createElement("a",i({},g,{href:o||R,onClick:w||l?s:function(e){s&&s(e),e.defaultPrevented||S(e)},ref:t,target:m}))})),A=a.forwardRef((function(e,t){let{"aria-current":r="page",caseSensitive:o=!1,className:s="",end:c=!1,style:l,to:f,unstable_viewTransition:d,children:m}=e,p=u(e,h),b=n.useResolvedPath(f,{relative:p.relative}),v=n.useLocation(),g=a.useContext(n.UNSAFE_DataRouterStateContext),{navigator:y}=a.useContext(n.UNSAFE_NavigationContext),w=null!=g&&z(b)&&!0===d,R=y.encodeLocation?y.encodeLocation(b).pathname:b.pathname,S=v.pathname,E=g&&g.navigation&&g.navigation.location?g.navigation.location.pathname:null;o||(S=S.toLowerCase(),E=E?E.toLowerCase():null,R=R.toLowerCase());let P,_=S===R||!c&&S.startsWith(R)&&"/"===S.charAt(R.length),O=null!=E&&(E===R||!c&&E.startsWith(R)&&"/"===E.charAt(R.length)),A={isActive:_,isPending:O,isTransitioning:w},j=_?r:void 0;P="function"==typeof s?s(A):[s,_?"active":null,O?"pending":null,w?"transitioning":null].filter(Boolean).join(" ");let C="function"==typeof l?l(A):l;return a.createElement(N,i({},p,{"aria-current":j,className:P,ref:t,style:C,to:f,unstable_viewTransition:d}),"function"==typeof m?m(A):m)})),j=a.forwardRef(((e,t)=>{let n=k();return a.createElement(C,i({},e,{submit:n,ref:t}))})),C=a.forwardRef(((e,t)=>{let{reloadDocument:n,replace:r,state:o,method:c=s,action:l,onSubmit:f,submit:d,relative:m,preventScrollReset:p,unstable_viewTransition:b}=e,v=u(e,g),h="get"===c.toLowerCase()?"get":"post",y=B(l,{relative:m});return a.createElement("form",i({ref:t,method:h,action:y,onSubmit:n?f:e=>{if(f&&f(e),e.defaultPrevented)return;e.preventDefault();let t=e.nativeEvent.submitter,n=(null==t?void 0:t.getAttribute("formmethod"))||c;d(t||e.currentTarget,{method:n,replace:r,state:o,relative:m,preventScrollReset:p,unstable_viewTransition:b})}},v))}));var x=function(e){return e.UseScrollRestoration="useScrollRestoration",e.UseSubmit="useSubmit",e.UseSubmitFetcher="useSubmitFetcher",e.UseFetcher="useFetcher",e.useViewTransitionState="useViewTransitionState",e}(x||{}),F=function(e){return e.UseFetchers="useFetchers",e.UseScrollRestoration="useScrollRestoration",e}(F||{});function T(e){let t=a.useContext(n.UNSAFE_DataRouterContext);return t||r.UNSAFE_invariant(!1),t}function U(e){let t=a.useContext(n.UNSAFE_DataRouterStateContext);return t||r.UNSAFE_invariant(!1),t}function L(e,t){let{target:r,replace:o,state:i,preventScrollReset:u,relative:s,unstable_viewTransition:c}=void 0===t?{}:t,l=n.useNavigate(),f=n.useLocation(),d=n.useResolvedPath(e,{relative:s});return a.useCallback((t=>{if(function(e,t){return!(0!==e.button||t&&"_self"!==t||function(e){return!!(e.metaKey||e.altKey||e.ctrlKey||e.shiftKey)}(e))}(t,r)){t.preventDefault();let r=void 0!==o?o:n.createPath(f)===n.createPath(d);l(e,{replace:r,state:i,preventScrollReset:u,relative:s,unstable_viewTransition:c})}}),[f,l,d,o,i,r,e,u,s,c])}function D(){if("undefined"==typeof document)throw new Error("You are calling submit during the server render. Try calling submit within a `useEffect` or callback instead.")}function k(){let{router:e}=T(x.UseSubmit),{basename:t}=a.useContext(n.UNSAFE_NavigationContext),r=n.UNSAFE_useRouteId();return a.useCallback((function(n,o){void 0===o&&(o={}),D();let{action:a,method:i,encType:u,formData:s,body:c}=b(n,t);e.navigate(o.action||a,{preventScrollReset:o.preventScrollReset,formData:s,body:c,formMethod:o.method||i,formEncType:o.encType||u,replace:o.replace,state:o.state,fromRouteId:r,unstable_viewTransition:o.unstable_viewTransition})}),[e,t,r])}function M(e,t){let{router:o}=T(x.UseSubmitFetcher),{basename:i}=a.useContext(n.UNSAFE_NavigationContext);return a.useCallback((function(n,a){void 0===a&&(a={}),D();let{action:u,method:s,encType:c,formData:l,body:f}=b(n,i);null==t&&r.UNSAFE_invariant(!1),o.fetch(e,t,a.action||u,{preventScrollReset:a.preventScrollReset,formData:l,body:f,formMethod:a.method||s,formEncType:a.encType||c})}),[o,i,e,t])}function B(e,t){let{relative:o}=void 0===t?{}:t,{basename:u}=a.useContext(n.UNSAFE_NavigationContext),s=a.useContext(n.UNSAFE_RouteContext);s||r.UNSAFE_invariant(!1);let[c]=s.matches.slice(-1),l=i({},n.useResolvedPath(e||".",{relative:o})),f=n.useLocation();if(null==e&&(l.search=f.search,c.route.index)){let e=new URLSearchParams(l.search);e.delete("index"),l.search=e.toString()?"?"+e.toString():""}return e&&"."!==e||!c.route.index||(l.search=l.search?l.search.replace(/^\?/,"?index&"):"?index"),"/"!==u&&(l.pathname="/"===l.pathname?u:r.joinPaths([u,l.pathname])),n.createPath(l)}let H=0;const I="react-router-scroll-positions";let K={};function V(e){let{getKey:t,storageKey:o}=void 0===e?{}:e,{router:u}=T(x.UseScrollRestoration),{restoreScrollPosition:s,preventScrollReset:c}=U(F.UseScrollRestoration),{basename:l}=a.useContext(n.UNSAFE_NavigationContext),f=n.useLocation(),d=n.useMatches(),m=n.useNavigation();a.useEffect((()=>(window.history.scrollRestoration="manual",()=>{window.history.scrollRestoration="auto"})),[]),function(e,t){let{capture:n}=t||{};a.useEffect((()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("pagehide",e,t),()=>{window.removeEventListener("pagehide",e,t)}}),[e,n])}(a.useCallback((()=>{if("idle"===m.state){let e=(t?t(f,d):null)||f.key;K[e]=window.scrollY}try{sessionStorage.setItem(o||I,JSON.stringify(K))}catch(e){}window.history.scrollRestoration="auto"}),[o,t,m.state,f,d])),"undefined"!=typeof document&&(a.useLayoutEffect((()=>{try{let e=sessionStorage.getItem(o||I);e&&(K=JSON.parse(e))}catch(e){}}),[o]),a.useLayoutEffect((()=>{let e=t&&"/"!==l?(e,n)=>t(i({},e,{pathname:r.stripBasename(e.pathname,l)||e.pathname}),n):t,n=null==u?void 0:u.enableScrollRestoration(K,(()=>window.scrollY),e);return()=>n&&n()}),[u,l,t]),a.useLayoutEffect((()=>{if(!1!==s)if("number"!=typeof s){if(f.hash){let e=document.getElementById(decodeURIComponent(f.hash.slice(1)));if(e)return void e.scrollIntoView()}!0!==c&&window.scrollTo(0,0)}else window.scrollTo(0,s)}),[f,s,c]))}function z(e,t){void 0===t&&(t={});let o=a.useContext(R);null==o&&r.UNSAFE_invariant(!1);let{basename:i}=T(x.useViewTransitionState),u=n.useResolvedPath(e,{relative:t.relative});if(!o.isTransitioning)return!1;let s=r.stripBasename(o.currentLocation.pathname,i)||o.currentLocation.pathname,c=r.stripBasename(o.nextLocation.pathname,i)||o.nextLocation.pathname;return null!=r.matchPath(u.pathname,c)||null!=r.matchPath(u.pathname,s)}Object.defineProperty(e,"AbortedDeferredError",{enumerable:!0,get:function(){return n.AbortedDeferredError}}),Object.defineProperty(e,"Await",{enumerable:!0,get:function(){return n.Await}}),Object.defineProperty(e,"MemoryRouter",{enumerable:!0,get:function(){return n.MemoryRouter}}),Object.defineProperty(e,"Navigate",{enumerable:!0,get:function(){return n.Navigate}}),Object.defineProperty(e,"NavigationType",{enumerable:!0,get:function(){return n.NavigationType}}),Object.defineProperty(e,"Outlet",{enumerable:!0,get:function(){return n.Outlet}}),Object.defineProperty(e,"Route",{enumerable:!0,get:function(){return n.Route}}),Object.defineProperty(e,"Router",{enumerable:!0,get:function(){return n.Router}}),Object.defineProperty(e,"Routes",{enumerable:!0,get:function(){return n.Routes}}),Object.defineProperty(e,"UNSAFE_DataRouterContext",{enumerable:!0,get:function(){return n.UNSAFE_DataRouterContext}}),Object.defineProperty(e,"UNSAFE_DataRouterStateContext",{enumerable:!0,get:function(){return n.UNSAFE_DataRouterStateContext}}),Object.defineProperty(e,"UNSAFE_LocationContext",{enumerable:!0,get:function(){return n.UNSAFE_LocationContext}}),Object.defineProperty(e,"UNSAFE_NavigationContext",{enumerable:!0,get:function(){return n.UNSAFE_NavigationContext}}),Object.defineProperty(e,"UNSAFE_RouteContext",{enumerable:!0,get:function(){return n.UNSAFE_RouteContext}}),Object.defineProperty(e,"UNSAFE_useRouteId",{enumerable:!0,get:function(){return n.UNSAFE_useRouteId}}),Object.defineProperty(e,"createMemoryRouter",{enumerable:!0,get:function(){return n.createMemoryRouter}}),Object.defineProperty(e,"createPath",{enumerable:!0,get:function(){return n.createPath}}),Object.defineProperty(e,"createRoutesFromChildren",{enumerable:!0,get:function(){return n.createRoutesFromChildren}}),Object.defineProperty(e,"createRoutesFromElements",{enumerable:!0,get:function(){return n.createRoutesFromElements}}),Object.defineProperty(e,"defer",{enumerable:!0,get:function(){return n.defer}}),Object.defineProperty(e,"generatePath",{enumerable:!0,get:function(){return n.generatePath}}),Object.defineProperty(e,"isRouteErrorResponse",{enumerable:!0,get:function(){return n.isRouteErrorResponse}}),Object.defineProperty(e,"json",{enumerable:!0,get:function(){return n.json}}),Object.defineProperty(e,"matchPath",{enumerable:!0,get:function(){return n.matchPath}}),Object.defineProperty(e,"matchRoutes",{enumerable:!0,get:function(){return n.matchRoutes}}),Object.defineProperty(e,"parsePath",{enumerable:!0,get:function(){return n.parsePath}}),Object.defineProperty(e,"redirect",{enumerable:!0,get:function(){return n.redirect}}),Object.defineProperty(e,"redirectDocument",{enumerable:!0,get:function(){return n.redirectDocument}}),Object.defineProperty(e,"renderMatches",{enumerable:!0,get:function(){return n.renderMatches}}),Object.defineProperty(e,"resolvePath",{enumerable:!0,get:function(){return n.resolvePath}}),Object.defineProperty(e,"unstable_useBlocker",{enumerable:!0,get:function(){return n.unstable_useBlocker}}),Object.defineProperty(e,"useActionData",{enumerable:!0,get:function(){return n.useActionData}}),Object.defineProperty(e,"useAsyncError",{enumerable:!0,get:function(){return n.useAsyncError}}),Object.defineProperty(e,"useAsyncValue",{enumerable:!0,get:function(){return n.useAsyncValue}}),Object.defineProperty(e,"useHref",{enumerable:!0,get:function(){return n.useHref}}),Object.defineProperty(e,"useInRouterContext",{enumerable:!0,get:function(){return n.useInRouterContext}}),Object.defineProperty(e,"useLoaderData",{enumerable:!0,get:function(){return n.useLoaderData}}),Object.defineProperty(e,"useLocation",{enumerable:!0,get:function(){return n.useLocation}}),Object.defineProperty(e,"useMatch",{enumerable:!0,get:function(){return n.useMatch}}),Object.defineProperty(e,"useMatches",{enumerable:!0,get:function(){return n.useMatches}}),Object.defineProperty(e,"useNavigate",{enumerable:!0,get:function(){return n.useNavigate}}),Object.defineProperty(e,"useNavigation",{enumerable:!0,get:function(){return n.useNavigation}}),Object.defineProperty(e,"useNavigationType",{enumerable:!0,get:function(){return n.useNavigationType}}),Object.defineProperty(e,"useOutlet",{enumerable:!0,get:function(){return n.useOutlet}}),Object.defineProperty(e,"useOutletContext",{enumerable:!0,get:function(){return n.useOutletContext}}),Object.defineProperty(e,"useParams",{enumerable:!0,get:function(){return n.useParams}}),Object.defineProperty(e,"useResolvedPath",{enumerable:!0,get:function(){return n.useResolvedPath}}),Object.defineProperty(e,"useRevalidator",{enumerable:!0,get:function(){return n.useRevalidator}}),Object.defineProperty(e,"useRouteError",{enumerable:!0,get:function(){return n.useRouteError}}),Object.defineProperty(e,"useRouteLoaderData",{enumerable:!0,get:function(){return n.useRouteLoaderData}}),Object.defineProperty(e,"useRoutes",{enumerable:!0,get:function(){return n.useRoutes}}),e.BrowserRouter=function(e){let{basename:t,children:o,future:i,window:u}=e,s=a.useRef();null==s.current&&(s.current=r.createBrowserHistory({window:u,v5Compat:!0}));let c=s.current,[l,f]=a.useState({action:c.action,location:c.location}),{v7_startTransition:d}=i||{},m=a.useCallback((e=>{d&&S?S((()=>f(e))):f(e)}),[f,d]);return a.useLayoutEffect((()=>c.listen(m)),[c,m]),a.createElement(n.Router,{basename:t,children:o,location:l.location,navigationType:l.action,navigator:c})},e.Form=j,e.HashRouter=function(e){let{basename:t,children:o,future:i,window:u}=e,s=a.useRef();null==s.current&&(s.current=r.createHashHistory({window:u,v5Compat:!0}));let c=s.current,[l,f]=a.useState({action:c.action,location:c.location}),{v7_startTransition:d}=i||{},m=a.useCallback((e=>{d&&S?S((()=>f(e))):f(e)}),[f,d]);return a.useLayoutEffect((()=>c.listen(m)),[c,m]),a.createElement(n.Router,{basename:t,children:o,location:l.location,navigationType:l.action,navigator:c})},e.Link=N,e.NavLink=A,e.RouterProvider=function(e){let{fallbackElement:t,router:r,future:o}=e,[i,u]=a.useState(r.state),[s,c]=a.useState(),[l,f]=a.useState({isTransitioning:!1}),[d,m]=a.useState(),[p,b]=a.useState(),[v,h]=a.useState(),{v7_startTransition:g}=o||{},y=a.useCallback((e=>{g?function(e){S?S(e):e()}(e):e()}),[g]),w=a.useCallback(((e,t)=>{let{unstable_viewTransitionOpts:n}=t;n&&null!=r.window&&"function"==typeof r.window.document.startViewTransition?p&&d?(d.resolve(),p.skipTransition(),h({state:e,currentLocation:n.currentLocation,nextLocation:n.nextLocation})):(c(e),f({isTransitioning:!0,currentLocation:n.currentLocation,nextLocation:n.nextLocation})):y((()=>u(e)))}),[y,p,d,r.window]);a.useLayoutEffect((()=>r.subscribe(w)),[r,w]),a.useEffect((()=>{l.isTransitioning&&m(new E)}),[l.isTransitioning]),a.useEffect((()=>{if(d&&s&&r.window){let e=s,t=d.promise,n=r.window.document.startViewTransition((async()=>{y((()=>u(e))),await t}));n.finished.finally((()=>{m(void 0),b(void 0),c(void 0),f({isTransitioning:!1})})),b(n)}}),[y,s,d,r.window]),a.useEffect((()=>{d&&s&&i.location.key===s.location.key&&d.resolve()}),[d,p,i.location,s]),a.useEffect((()=>{!l.isTransitioning&&v&&(c(v.state),f({isTransitioning:!0,currentLocation:v.currentLocation,nextLocation:v.nextLocation}),h(void 0))}),[l.isTransitioning,v]);let _=a.useMemo((()=>({createHref:r.createHref,encodeLocation:r.encodeLocation,go:e=>r.navigate(e),push:(e,t,n)=>r.navigate(e,{state:t,preventScrollReset:null==n?void 0:n.preventScrollReset}),replace:(e,t,n)=>r.navigate(e,{replace:!0,state:t,preventScrollReset:null==n?void 0:n.preventScrollReset})})),[r]),O=r.basename||"/",N=a.useMemo((()=>({router:r,navigator:_,static:!1,basename:O})),[r,_,O]);return a.createElement(a.Fragment,null,a.createElement(n.UNSAFE_DataRouterContext.Provider,{value:N},a.createElement(n.UNSAFE_DataRouterStateContext.Provider,{value:i},a.createElement(R.Provider,{value:l},a.createElement(n.Router,{basename:O,location:i.location,navigationType:i.historyAction,navigator:_},i.initialized?a.createElement(P,{routes:r.routes,state:i}):t)))),null)},e.ScrollRestoration=function(e){let{getKey:t,storageKey:n}=e;return V({getKey:t,storageKey:n}),null},e.UNSAFE_ViewTransitionContext=R,e.UNSAFE_useScrollRestoration=V,e.createBrowserRouter=function(e,t){return r.createRouter({basename:null==t?void 0:t.basename,future:i({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:r.createBrowserHistory({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||y(),routes:e,mapRouteProperties:n.UNSAFE_mapRouteProperties,window:null==t?void 0:t.window}).initialize()},e.createHashRouter=function(e,t){return r.createRouter({basename:null==t?void 0:t.basename,future:i({},null==t?void 0:t.future,{v7_prependBasename:!0}),history:r.createHashHistory({window:null==t?void 0:t.window}),hydrationData:(null==t?void 0:t.hydrationData)||y(),routes:e,mapRouteProperties:n.UNSAFE_mapRouteProperties,window:null==t?void 0:t.window}).initialize()},e.createSearchParams=f,e.unstable_HistoryRouter=function(e){let{basename:t,children:r,future:o,history:i}=e,[u,s]=a.useState({action:i.action,location:i.location}),{v7_startTransition:c}=o||{},l=a.useCallback((e=>{c&&S?S((()=>s(e))):s(e)}),[s,c]);return a.useLayoutEffect((()=>i.listen(l)),[i,l]),a.createElement(n.Router,{basename:t,children:r,location:u.location,navigationType:u.action,navigator:i})},e.unstable_usePrompt=function(e){let{when:t,message:r}=e,o=n.unstable_useBlocker(t);a.useEffect((()=>{if("blocked"===o.state){window.confirm(r)?setTimeout(o.proceed,0):o.reset()}}),[o,r]),a.useEffect((()=>{"blocked"!==o.state||t||o.reset()}),[o,t])},e.unstable_useViewTransitionState=z,e.useBeforeUnload=function(e,t){let{capture:n}=t||{};a.useEffect((()=>{let t=null!=n?{capture:n}:void 0;return window.addEventListener("beforeunload",e,t),()=>{window.removeEventListener("beforeunload",e,t)}}),[e,n])},e.useFetcher=function(){var e;let{router:t}=T(x.UseFetcher),o=a.useContext(n.UNSAFE_RouteContext);o||r.UNSAFE_invariant(!1);let u=null==(e=o.matches[o.matches.length-1])?void 0:e.route.id;null==u&&r.UNSAFE_invariant(!1);let[s]=a.useState((()=>String(++H))),[c]=a.useState((()=>(u||r.UNSAFE_invariant(!1),function(e,t){return a.forwardRef(((n,r)=>{let o=M(e,t);return a.createElement(C,i({},n,{ref:r,submit:o}))}))}(s,u)))),[l]=a.useState((()=>e=>{t||r.UNSAFE_invariant(!1),u||r.UNSAFE_invariant(!1),t.fetch(s,u,e)})),f=M(s,u),d=t.getFetcher(s),m=a.useMemo((()=>i({Form:c,submit:f,load:l},d)),[d,c,f,l]);return a.useEffect((()=>()=>{t?t.deleteFetcher(s):console.warn("No router available to clean up from useFetcher()")}),[t,s]),m},e.useFetchers=function(){return[...U(F.UseFetchers).fetchers.values()]},e.useFormAction=B,e.useLinkClickHandler=L,e.useSearchParams=function(e){let t=a.useRef(f(e)),r=a.useRef(!1),o=n.useLocation(),i=a.useMemo((()=>function(e,t){let n=f(e);return t&&t.forEach(((e,r)=>{n.has(r)||t.getAll(r).forEach((e=>{n.append(r,e)}))})),n}(o.search,r.current?null:t.current)),[o.search]),u=n.useNavigate(),s=a.useCallback(((e,t)=>{const n=f("function"==typeof e?e(i):e);r.current=!0,u("?"+n,t)}),[u,i]);return[i,s]},e.useSubmit=k,Object.defineProperty(e,"__esModule",{value:!0})}));
//# sourceMappingURL=react-router-dom.production.min.js.map
